package cn.lr.org.service.impl;

import cn.lr.basic.service.impl.BaseServiceImpl;
import cn.lr.org.domain.Detail;
import cn.lr.org.mapper.DetailMapper;
import cn.lr.org.service.IDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DetailServiceImpl extends BaseServiceImpl<Detail> implements IDetailService {
    @Autowired
    private DetailMapper detailMapper;

    @Override
    public void save(Detail detail) {
        detailMapper.save(detail);
    }

    @Override
    @Transactional
    public void update(Detail detail) {
        detailMapper.update(detail);
    }

    @Override
    public List<Detail> queryByTypeId(Long id) {
        return detailMapper.queryByTypeId(id);
    }
}
